package com.paomi.client.base;


import com.hannesdorfmann.mosby3.mvp.MvpView;

import java.util.List;

/**
 * Created by LS on 2017/5/25 0025.
 */

public interface BaseMvpLCEView<M> extends MvpView {
//    void showLoading();
    /**
     * Show the error view.
     * <b>The error view must be a TextView with the id = R.id.errorView</b>
     *
     * @param pullToRefresh true, if the exception was thrown during pull-to-refresh, otherwise
     * false.
     */
//    public void showError(Throwable e, boolean pullToRefresh);

    void setData(List<M> data, boolean pullToRefresh);

    /**
     * Load the data. Typically invokes the presenter method to load the desired data.
     * <p>
     * <b>Should not be called from presenter</b> to prevent infinity loops. The method is declared
     * in
     * the views interface to add support for view state easily.
     * </p>
     *
     * @param pullToRefresh true, if triggered by a pull to refresh. Otherwise false.
     */
    void loadData(boolean pullToRefresh);
}
